package com.member.controller;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.admin.dao.AdminDao;
import com.member.dao.MemberDao;
import com.shop.domain.CartCommand;

@Controller
public class MyCartListController {

	@Autowired
	private MemberDao memberDao;
	
	@RequestMapping("/shop/cartList.do")
	public ModelAndView process(HttpSession session){
		
		String userId = (String)session.getAttribute("userId");
		
		List<CartCommand> list = memberDao.selectMyCartList(userId); 
		
		
		return new ModelAndView("myCartList","cartList",list);
	}
	
	
}
